package com.example.administrator.zyfypt111pzy.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;

import com.example.administrator.zyfypt111pzy.R;
import com.squareup.picasso.Picasso;

public class ViewVideoActivity_outer extends AppCompatActivity {

    private TextView tvtitle,tvdescript,tvtime;
    private ImageButton im_video;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_view_video_outer);
        tvtitle=(TextView)findViewById(R.id.tv_video_title);
        tvdescript=(TextView)findViewById(R.id.tv_video_description);
        tvtime=(TextView)findViewById(R.id.tv_video_update_time);
        im_video=(ImageButton)findViewById(R.id.im_video);
        tvtitle.setText(getIntent().getStringExtra("title"));
        tvtime.setText(getIntent().getStringExtra("time"));
        tvdescript.setText(getIntent().getStringExtra("description"));
        Picasso.with(ViewVideoActivity_outer.this).load("http://amicool.neusoft.edu.cn/Uploads/"+getIntent().getStringExtra("thumb"))
                .placeholder(R.mipmap.ic_launcher)
                .into(im_video);
        im_video.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(ViewVideoActivity_outer.this,ViewVideoActivity.class);
                startActivity(intent);

            }
        });
    }
}

